﻿using Helpers;
using System;
using System.Linq;
using System.Diagnostics;
using System.Threading;
using System.Collections.Generic;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //Thread t = new Thread(Thread_Start);
                //t.Start();

                while (true)
                {
                    ConsoleKeyInfo cmdKey = Console.ReadKey();

                    Console.WriteLine(cmdKey.Key.ToString());
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.Message);
            }
        }

        //static void Thread_Start(object target)
        //{
        //    while (true)
        //    {
        //        string text = Processes.GetActiveWindowTitle();

        //        List<Process> procs = Process.GetProcesses().ToList();

        //        Process actProc = procs.Find(proc => proc.MainWindowTitle == text);

        //        Console.WriteLine(actProc.ProcessName);

        //        Thread.Sleep(1000);
        //    }
        //}
    }
}
